
import groovy.json.*

import java.net.URL

def slurper = new JsonSlurper()

//println  "ccc " + context + " 4r " + context.getResource("/json/categories.json")
def x = context.getResource("/json/categories.json")
def l = slurper.parse(x)
def catMap = [:]

l.each {
		catMap.put(it.categoryId,it.name)
	}

System.out.println(catMap) 

		  // categories[val.categoryId]=val.name

//def builder = new groovy.xml.MarkupBuilder(out)

//def builder = new groovy.xml.MarkupBuilder(out)
//String s = builder.div {          
html.div {
  div { a(href:'http://groovy.codehaus.org', "Groovy") }
  
  div { a(href: "on.jpg", target: "_blank",  "link to image" )}        
 
  div  "uup" 
}

//System.out.println(builder)

//out( s )


